<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if $admin.site_id>0}
    <input id="c-site_id" data-rule="required" name="row[site_id]" style="display: none;" type="text" value="{$admin.site_id}">
    <input id="c-user_id" data-rule="required" name="row[user_id]" style="display: none;" type="text" value="0">
    {else /}
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id"  data-source="user/user/_index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Site_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-site_id"  data-source="user/user/_index" data-field="sitename" data-params='{"custom[is_siter]":"1"}' class="form-control selectpage" name="row[site_id]" type="text" value="" placeholder="不选为主站发布">
        </div>
    </div>
    {/if}
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2">{:__('Author')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-author" data-rule="required" class="form-control" name="row[author]" type="text" value="">-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Resource')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-resource" class="form-control" name="row[resource]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="form-inline col-xs-12 col-sm-8" data-toggle="cxselect" data-selects="first,second">
            <select class="first form-control" data-rule="required"  name="first" data-url="ajax/category?type=article&amp;pid=0&amp;way=add&amp;site_id={$admin.site_id}"></select>
            <select class="second form-control" data-rule="required" name="second" data-url="ajax/category?way=add&amp;site_id={$admin.site_id}" data-query-name="pid"></select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Coverimages')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-coverimages" class="form-control" size="50" name="row[coverimages]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-coverimages" class="btn btn-danger plupload" data-input-id="c-coverimages" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-coverimages"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-coverimages" class="btn btn-primary fachoose" data-input-id="c-coverimages" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-coverimages"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-coverimages"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Videofile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-videofile" class="form-control" size="50" name="row[videofile]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-videofile" class="btn btn-danger plupload" data-input-id="c-videofile" data-mimetype="video/mp4" data-multiple="false" data-maxsize="1024M" data-preview-id="p-videofile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-videofile" class="btn btn-primary fachoose" data-input-id="c-videofile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-videofile"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-videofile"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Postcontent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-postcontent" data-rule="required" class="form-control editor" rows="5" name="row[postcontent]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Createdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="createdataList" item="vo"}
            <label for="row[createdata]-{$key}"><input id="row[createdata]-{$key}" name="row[createdata]" type="radio" value="{$key}" {in name="key" value="2"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Publishdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="publishdataList" item="vo"}
            <label for="row[publishdata]-{$key}"><input id="row[publishdata]-{$key}" name="row[publishdata]" type="radio" value="{$key}" {in name="key" value="2"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Recommenddata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="recommenddataList" item="vo"}
            <label for="row[recommenddata]-{$key}"><input id="row[recommenddata]-{$key}" name="row[recommenddata]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hotdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="hotdataList" item="vo"}
            <label for="row[hotdata]-{$key}"><input id="row[hotdata]-{$key}" name="row[hotdata]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Topdata')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="topdataList" item="vo"}
            <label for="row[topdata]-{$key}"><input id="row[topdata]-{$key}" name="row[topdata]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reading')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reading" data-rule="required" class="form-control" name="row[reading]" type="number" value="0">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Good')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-good" data-rule="required" class="form-control" name="row[good]" type="number" value="0">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-share" data-rule="required" class="form-control" name="row[share]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comment')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-comment" data-rule="required" class="form-control" name="row[comment]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Publishtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-publishtime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[publishtime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
